package com.example.movie.domain;

import lombok.Data;

import java.io.Serializable;

@Data
public class R implements Serializable {
    String msg;
    String code;
    Object data;

    public R(String msg, String code, Object data) {
        this.msg=msg;
        this.code=code;
        this.data=data;
    }

    public static R ok(Object data){
        return new R("","200",data);
    }

    public static R ok(){
        return new R("","200",null);
    }

    public static R error(String msg){
        return new R(msg,"400",null);
    }


}
